package org.bigjava.buff.common.util;

import com.fasterxml.jackson.databind.ObjectMapper;

//转json对象工具类

public class JsonObjectUtil {

    public static String getJson(Object obj){
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(obj);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

}
